Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when no audio information is found. #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lu4nx
Copy link

@lu4nx lu4nx commented Sep 3, 2024

如果视频里没有音频,会出现异常:

Traceback (most recent call last):
  File "/home/lu4nx/FunClip/funclip/videoclipper.py", line 447, in <module>
    main()
  File "/home/lu4nx/FunClip/funclip/videoclipper.py", line 443, in main
    runner(**kwargs)
  File "/home/lu4nx/FunClip/funclip/videoclipper.py", line 396, in runner
    res_text, res_srt, state = audio_clipper.video_recog(file, sd_switch)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lu4nx/FunClip/funclip/videoclipper.py", line 155, in video_recog
    video.audio.write_audiofile(audio_file)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_audiofile'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant